package designpatterns.state;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/17/2022 7:43 PM
 */
public class Context {

    private State state;

    /**
     * 初始化
     */
    public Context() {
        this.state = new ConcreteStateA();
    }

    //对请求做处理
    public void handle() {
        state.Handle(this);
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }
}
